# coding:utf-8
# 作者：理想国真恵玩
import pandas as pd
import numpy as np

# 读取数据
df_movie = pd.read_csv('data/movie.csv')
# print(df_movie)

# 判断是否存在缺失值
# print(df_movie.isna())

# 只要有一个缺失值，就返回False
print(np.all(df_movie.notnull()))

# 只要有一个缺失值，就返回True
print(np.any(df_movie.isnull()))

# 删除缺失值
df_movie_new = df_movie.dropna()
print(np.all(df_movie_new.notnull()))

# 替换缺失值
df_movie_new1 = df_movie.fillna(0)
print(np.all(df_movie_new1.notnull()))
